using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Main.controls;

namespace Main
{
    public partial class Testing1 : System.Web.UI.Page
    {
        protected ShowPoll myShowPoll;
        protected PollCollection myPolls = new PollCollection();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                Control WelcomeContent = LoadControl("controls/WelcomeContent.ascx");

                if (this.User.Identity.IsAuthenticated)
                {
                    Response.Redirect("home.aspx");
                }
                else
                {
                    this.mainPanel.Controls.Add(WelcomeContent);
                }
            }
        }
    }
}
